﻿<dialogs:BaseMetroDialog 
  x:Class="SoftTeach.View.Noten.MetroNotentendenzDialog"
  xmlns:dialogs="clr-namespace:MahApps.Metro.Controls.Dialogs;assembly=MahApps.Metro"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:softTeach="clr-namespace:SoftTeach"
  xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
  xmlns:noten="clr-namespace:SoftTeach.ViewModel.Noten"
  xmlns:sys="clr-namespace:System;assembly=mscorlib"
  xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
  mc:Ignorable="d" 
  Title="{Binding NotentendenzTitel}" d:DesignWidth="991.045" d:DesignHeight="479.114">
  <dialogs:BaseMetroDialog.Resources>
    <ResourceDictionary>
      <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/SoftTeach;component/Resources/MetroResources.xaml"/>
        <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/FlatSlider.xaml" />
        <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Themes/Dialogs/BaseMetroDialog.xaml" />
       </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
  </dialogs:BaseMetroDialog.Resources>
  <Grid>
    <StackPanel>
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <DatePicker Grid.Column="0" Width="180"
				x:Name="NoteGültigAmDate" 
				Margin="0,5"
				FontSize="24"
				HorizontalAlignment="Left"
				SelectedDate="{Binding NotentendenzDatum, NotifyOnValidationError=True, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"/>
        <TextBox Grid.Column="1" Height="{Binding ActualHeight, ElementName=NoteGültigAmDate}" Style="{StaticResource MetroLabelStyle}" Margin="5" VerticalAlignment="Center" Text="{Binding NotentendenzBezeichnung}"/>
      </Grid>
      <ListBox Margin="5"
				ItemsSource="{Binding Tendenztypen, Source={x:Static softTeach:App.MainViewModel}}"             
				BorderThickness="0"
				SelectedItem="{Binding NotentendenzTendenztyp}"
				x:Name="TendenztypenListBox"
				ItemTemplate="{StaticResource MetroTendenztypView}"
        ItemContainerStyle="{StaticResource MetroSelectableListBoxItem}">
        <ListBox.ItemsPanel>
          <ItemsPanelTemplate>
            <WrapPanel Width="{Binding ActualWidth, ElementName=TendenztypenListBox}"/>
          </ItemsPanelTemplate>
        </ListBox.ItemsPanel>
      </ListBox>
      <ListBox Margin="5"
				ItemsSource="{Binding Tendenzen, Source={x:Static softTeach:App.MainViewModel}}"             
				BorderThickness="0"
				SelectedItem="{Binding NotentendenzTendenz}"
				x:Name="TendenzenListBox"
				ItemTemplate="{StaticResource MetroTendenzenView}"
        ItemContainerStyle="{StaticResource MetroSelectableListBoxItem}">
        <ListBox.ItemsPanel>
          <ItemsPanelTemplate>
            <WrapPanel Width="{Binding ActualWidth, ElementName=TendenzenListBox}"/>
          </ItemsPanelTemplate>
        </ListBox.ItemsPanel>
      </ListBox>
      <Button Width="100" FontSize="20" Margin="10" Content="Fertig" Style="{DynamicResource AccentedSquareButtonStyle}" Click="FertigButtonOnClick"/>
    </StackPanel>
  </Grid>
</dialogs:BaseMetroDialog>
